<?php
if(!empty($_POST))
{
	$id = $_POST['Id'];
	$dst = upload($_FILES['file']);
	$src = upload($_FILES['img']);
	$waterimg = imagewater($src,$dst);
	$_POST['file'] = $waterimg;
	$_POST['img'] = $src;
	$ree = update('waterimg', $_POST, $id);
	if($ree)
	{
		echo '修改成功';
		header('Refresh:1;index.php?a=admin&b=waterimg&c=index');
		die;
	}
	else
	{
		echo '修改失败';
		header('Refresh:1;index.php?a=admin&b=waterimg&c=index');
		die;
	}	
}
$id = $_GET['id'];
$re = selectone('waterimg','Id='.$id);


include('app/admin/waterimg/html/update.html');
?>